/**
 * 创作者相关类型定义
 */

// 创作者基本信息
export interface CreatorDetail {
  id: number
  creator_id: string
  nickname: string
  avatar: string
  cover_image: string
  platform: string
  platform_icon: string
  creator_type: number // 1=直播主播, 2=视频博主, 3=两者皆是
  main_url: string
  live_url: string
  video_url: string
  video_platforms: VideoPlatform[]
  category: string
  game_tags: string
  game_tags_array: string[]
  description: string
  followers: number
  status: number
  is_recommend: number
  sort_order: number
  create_time: string
  update_time: string
  delete_time: string | null
}

// 视频平台信息
export interface VideoPlatform {
  platform_name: string
  platform_icon: string
  platform_url: string
}

// 创作者列表响应
export interface CreatorsResponse {
  total: number
  list: CreatorDetail[]
  current_page: number
  per_page: number
  last_page: number
}

// 创作者筛选参数
export interface CreatorFilter {
  page: number
  limit: number
  category: string
  keyword: string
  creator_type: number // 0=全部, 1=直播主播, 2=视频博主, 3=两者皆是
  status: string
}

// 创作者分类响应 - 直接返回字符串数组
export type CreatorCategoriesResponse = string[]

// 创作者卡片显示数据
export interface CreatorCardData {
  id: number
  nickname: string
  avatar: string
  category: string
  creator_type: number
  description: string
  followers: number
  game_tags_array: string[]
  is_recommend: number
  status: number
}

// 创作者统计信息
export interface CreatorStats {
  total_creators: number
  live_streamers: number
  video_creators: number
  both_types: number
  active_creators: number
}

// 创作者搜索建议
export interface CreatorSearchSuggestion {
  id: number
  nickname: string
  avatar: string
  category: string
  creator_type: number
}

// 创作者排序选项
export type CreatorSortOption =
  | 'followers_desc'
  | 'followers_asc'
  | 'create_time_desc'
  | 'create_time_asc'
  | 'sort_order_desc'

// 创作者视图模式
export type CreatorViewMode = 'grid' | 'list'

// 创作者类型枚举
export enum CreatorType {
  ALL = 0,
  LIVE_STREAMER = 1,
  VIDEO_CREATOR = 2,
  BOTH = 3
}

// 创作者状态枚举
export enum CreatorStatus {
  INACTIVE = 0,
  ACTIVE = 1,
  PAUSED = 2,
  BANNED = 3
}
